/* ── Type Takeover section (scoped to .scroll-scene so the rest of the page is untouched) ── */
@property --p {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

.scroll-scene * {
  box-sizing: border-box;
}

/* original `body` rule, scoped to the section */
.scroll-scene {
  margin: 0;
  background: #ff4d00;
  color: #ffffff;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  /* integration: sit above the fixed WebGL canvas + scanlines */
  position: relative;
  z-index: 10;
}

.scroll-scene {
  height: 350vh;
  view-timeline-name: --takeover;
  view-timeline-axis: block;
}

.scroll-scene .takeover-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  isolation: isolate;

  animation: takeover linear both;
  animation-timeline: --takeover;
  animation-range: contain 0% contain 100%;
}

@keyframes takeover {
  to { --p: 1; }
}

.scroll-scene header,
.scroll-scene footer {
  position: absolute;
  left: 5%;
  right: 5%;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.scroll-scene header {
  top: 30px;
}

.scroll-scene header a {
  color: inherit;
  text-decoration: none;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.scroll-scene header span,
.scroll-scene .intro p,
.scroll-scene footer {
  font-family: monospace;
  font-size: 11px;
  letter-spacing: 1.5px;
}

.scroll-scene .intro {
  position: absolute;
  top: 16%;
  left: 5%;
  z-index: 2;
  opacity: calc(1 - var(--p) * 5);
  pointer-events: none;
}

.scroll-scene .intro p {
  opacity: 0.6;
}

.scroll-scene h1 {
  margin: 12px 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(28px, 4vw, 55px);
  font-weight: 700;
  letter-spacing: -0.03em;
  text-transform: none;
}

.scroll-scene .word,
.scroll-scene .reveal {
  position: absolute;
  left: 50%;
  top: 50%;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 700;
  text-transform: none;
  text-align: center;
  pointer-events: none;
}

.scroll-scene .word {
  font-size: clamp(80px, 23vw, 420px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  padding-right: 0.04em;
  text-transform: uppercase;

  transform:
    translate(-50%, -50%)
    scale(calc(1 + var(--p) * 28));

  opacity: calc(1 - max(0, var(--p) - 0.65) * 3);
}

.scroll-scene .reveal {
  width: 90%;
  font-size: clamp(50px, 10vw, 150px);
  line-height: 0.96;
  letter-spacing: -0.03em;
  word-spacing: 0.04em;
  transform: translate(-50%, -50%);
  opacity: calc((var(--p) - 0.72) * 4);
}

.scroll-scene footer {
  bottom: 30px;
}

.scroll-scene .hint {
  opacity: calc(1 - var(--p) * 5);
}

.scroll-scene button {
  padding: 12px 18px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 30px;
  background: #ff4d00;
  color: #ffffff;
  font: inherit;
  cursor: pointer;
}

.scroll-scene button:hover {
  background: #ffffff;
  color: #ff4d00;
}

.scroll-scene a:focus-visible,
.scroll-scene button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.scroll-scene .progress {
  display: none;
}

@media (max-width: 600px) {
  .scroll-scene header span {
    display: none;
  }

  .scroll-scene footer {
    font-size: 9px;
    letter-spacing: 0.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-scene {
    height: 100svh;
  }

  .scroll-scene .takeover-stage {
    animation: none;
    --p: 1;
  }

  .scroll-scene .word,
  .scroll-scene .intro,
  .scroll-scene .hint {
    display: none;
  }
}
